gl: Fix RGB uploads
authorMatthias Clasen <mclasen@redhat.com>
Fri, 25 Sep 2020 17:15:54 +0000 (13:15 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Fri, 25 Sep 2020 17:16:47 +0000 (13:16 -0400)
I don't really know what to say, other than:
OpenGL is terrible

Fixes: #3194
gdk/gdkglcontext.c

index f9512b0343c5f640c28f3ada95bb5cba9d04f43b..5614b2ce47491e65c0fde743005de36843b487e2 100644 (file)
@@ -291,6 +291,8 @@ gdk_gl_context_upload_texture (GdkGLContext    *context,
    */
   if (stride == width * bpp)
     {
+      glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
+
       glTexImage2D (texture_target, 0, GL_RGBA, width, height, 0, gl_format, gl_type, data);
     }
   else if ((!priv->use_es ||